import request from '@/utils/request'

let group = '/users'

export function getPageList(page,size) {
  return request({
    url: group+'/page',
    method: 'get',
    params: {
        page,
        size
    }
  })
}

export function del(id) {
  return request({
    url: group+ '/'+id,
    method: 'delete'
  })
}

export function enable(id) {
  return request({
    url: group+ '/enable/'+id,
    method: 'put'
  })
}

export function add(data) {
  return request({
    url: group,
    method: 'post',
    data:data
  })
}

export function update(id,data) {
  return request({
    url: group + '/'+id,
    method: 'put',
    data:data
  })
}
